import {createStore,applyMiddleware,compose} from 'redux';
import Reducer from './reducer';
import mySaga from './sagas';
import createSagaMiddleware from 'redux-saga'
const sagaMiddleware = createSagaMiddleware()
const composeEnhancers =window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ?   window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
      // Specify extension’s options like name, actionsBlacklist, actionsCreators, serialize...
    }) : compose;

const enhancer = composeEnhancers(
  applyMiddleware(sagaMiddleware),
  // other store enhancers if any
);
const store = createStore(Reducer,enhancer);
sagaMiddleware.run(mySaga)
export default store;